num = eval(input("请输入i值："))
sum = 0
for i in range(1,num):
    sum += (-1) ** (i+1) / (2*i - 1)

pi = 4*sum
print(pi)